package com.ybxy;

public class Test01 {
    public static void main(String[] args) {
        Animal animal1 = new Animal(){
            public void sound(){
                System.out.println("喵喵喵");
            }
        };
        animal1.sound();
        Animal animal2 = () -> System.out.println("汪汪汪");
        animal2.sound();

    }
}
